package cn.silver.module.system.enums;

import cn.silver.framework.core.model.DictModel;
import cn.silver.framework.core.utils.StreamUtils;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

@Getter
@AllArgsConstructor
public enum PostStatusEnums {
    PROFESS("00","转正"),
    INSPECT("01","试用"),
    PRACTICE("02","实习"),
    SECOND("03","借调"),
    DIMISS("04","离岗"),
    ;
    private final String code;
    private final String name;

    public static List<DictModel> getModels() {
        return StreamUtils.toList(Arrays.asList(values()), item -> new DictModel(item.name, item.code));
    }
}
